MobileCredentialHolder

class MobileCredentialHolder : SdkLifecycle

The entry point for the MobileCredentialHolder SDK.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val initialized: Boolean

Functions

Link copied to clipboard
@Blocking
fun addCredential(credential: String, deviceKeyId: String): String

Add a mobile credential to storage.

Link copied to clipboard
@Blocking
fun addTrustedIssuerCertificates(certificates: List<String>): List<String>

Add trusted issuer certificates to storage.

Link copied to clipboard
@Blocking
fun addTrustedVerifierCertificates(certificates: List<String>): List<String>

Add trusted verifier certificates to storage.

Link copied to clipboard
@Blocking
fun createOnlinePresentationSession(    authorizationRequestUri: String,     authenticationOption: AuthenticationOption = AuthenticationOption.Signature,     requireTrustedVerifier: Boolean = false): OnlinePresentationSession

Create an online presentation session compliant with the ISO 18013-7 and OpenID4VP.

Link copied to clipboard
suspend fun createProximityPresentationSession(    activity: Activity,     authenticationOption: AuthenticationOption = AuthenticationOption.Signature,     bleMode: BleMode = BleMode.MDocClientCentral,     onRequestReceived: ProximityPresentationSession.OnRequestReceived,     onConnected: ProximityPresentationSession.OnConnected? = null,     onSessionTerminated: ProximityPresentationSession.OnSessionTerminated? = null): ProximityPresentationSession

Create a proximity based presentation session with a mobile credential verifier using device retrieval as per ISO/IEC 18013-5:2021.

Link copied to clipboard
suspend fun deinitialize()

Deinitialize the MobileCredentialHolder SDK.

Link copied to clipboard
@Blocking
fun deleteCredential(id: String)

Deletes a mobile credential from storage.

Link copied to clipboard
@Blocking
fun deleteTrustedIssuerCertificate(certificateId: String)

Delete a trusted issuer certificate from storage.

Link copied to clipboard
@Blocking
fun deleteTrustedVerifierCertificate(certificateId: String)

Delete a trusted verifier certificate from storage.

Link copied to clipboard
suspend fun destroy(context: Context, instanceId: String = DEFAULT_INSTANCE_ID)

Destroys an instance of the SDK.

Link copied to clipboard

It is recommended to display the details of DiscoveredCredentialOffer on the app UI before calling the retrieveCredentials function.

Link copied to clipboard
suspend fun generateDeviceKey(activity: Activity, popOptions: DeviceKeyPopOptions? = null): GeneratedDeviceKeyResult

Generate a device key for provisioning a new mobile credential.

Link copied to clipboard
@Blocking
fun getCredential(id: String, skipStatusCheck: Boolean = false): MobileCredential

Retrieve a specific mobile credential from the storage.

Link copied to clipboard

Retrieve all mobile credentials' metadata from storage.

Link copied to clipboard

Get the current proximity presentation session.

Link copied to clipboard
fun getLog(): String?

Close and return the full address of the current log file.

Link copied to clipboard

Retrieve all trusted issuer certificates from storage.

Link copied to clipboard

Retrieve all trusted verifier certificates from storage.

Link copied to clipboard
suspend fun initialize(    activity: Activity,     instanceId: String = DEFAULT_INSTANCE_ID,     userAuthRequiredOnInitialize: Boolean = true,     credentialIssuanceConfiguration: CredentialIssuanceConfiguration? = null,     loggerConfiguration: Logger.LoggerConfiguration? = null)

Initialize the MobileCredentialHolder SDK. The MobileCredentialHolder class is a singleton which can only be initialized with one instanceId at a time. After this initialize method has been called, all subsequent method calls in this class, such as getTrustedIssuerCertificates, will return a result unique to the specified instanceId.

Link copied to clipboard
suspend fun retrieveCredentials(    activity: Activity,     credentialOffer: String,     clientId: String,     transactionCode: String? = null): List<RetrieveCredentialResult>

A failure to retrieve, validate, or save a credential will NOT automatically cause a failure of other credential requests.